<style>
.unit label{
	width:125px;
}
</style>
<script type="text/javascript">
				function setapprovrVal() {
					
					
					//var quality=document.getElementById('quality').value;
					//金额
					var totalprice = document.getElementById('receivedamount');
					//单价
					var price = document.getElementById('univalence');
					//量
					var quality = document.getElementById('capacity');
					//totalprice.value=quality*price;
					if(totalprice.value!=null&&totalprice.value!=""&&price.value!=null&&price.value!="")
					{
					  quality.value = totalprice.value / price.value;
					}
					else if(quality.value!=null&&quality.value!=""&&price.value!=null&&price.value!="")
					{
						totalprice.value=quality.value*price.value;
						
					}
				}
				
				function hideOrshow()
				{
					var payondelivery=document.getElementById("payondelivery");
					if(payondelivery.checked)
					{
						apphideText();
					}
					else
						{
						setapprovrVal();
						}
					
				}
				
				function apphideText()
				{
					document.getElementById('receivedamount').value="";
				}
			</script>
<div class="pageContent">
<form method="post" action="__URL__/updatecontrollog/navTabId/__MODULE__/callbackType/closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone1);">
	    <input type="hidden" name="userid" value="<?php echo $_SESSION[C('USER_AUTH_KEY')] ?>">
		<input type="hidden" name="id" value="{$vo.id}" >
		<div class="pageFormContent" layoutH="50">
		 <div class="unit">
				<label>到款金额</label>
				<input type="text" class="number" id="receivedamount" name="receivedamount" value="{$vo.receivedamount}" onblur="setapprovrVal();">
		 </div>
		  <div class="unit">
				<label>单价</label>
				<input type="text" class="number" id="univalence" name="univalence" value="{$vo.univalence}" onblur="setapprovrVal();">
		 </div>
		 <div class="unit">
				<label>放量(吨)</label>
				<input type="text" class="number" id="capacity" name="capacity" value="{$vo.capacity}" onblur="setapprovrVal();" onkeydown="apphideText();">
		 </div>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
	</div>